package com.work.db;

public class SqlQuery {
	
	public static final String GET_WORK_MONTHS = "SELECT distinct month(date) FROM workovertime.workday wd where year(date) = :year";
	
	public static final String GET_TOTAL_OVERTIME_MINUTES = "SELECT SUM(o.minutes) FROM workovertime.overtime o " +
			"JOIN workovertime.workday w ON w.ID = o.workday_ID " + 
			"JOIN workovertime.employer e ON w.employer_ID = e.ID WHERE e.ID = :employerId";
	
	public static final String GET_REMAINING_LEAVE = "SELECT workovertime.getRemainingHolidayLeave(:employerId,:year)";

	public static final String GET_OVERTIME_TO_TAKE = "SELECT workovertime.getOvertimeToTake(:employerId,:year)";

	public static final String GET_TAKEN_LEAVES = "SELECT l.* FROM leave_of_absence l JOIN workday w ON l.ID = w.leaveOfAbsence_ID " +
			"JOIN employer e ON w.employer_ID = e.ID WHERE e.ID = :employerId AND l.LEAVE_TYPE in (:leaves)";

}
